/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package exercicio_11;

/**
 *
 * @author Gustavo
 */
public class Retangulo extends Triangudo {

    private double ladoA;
    private double ladoB;
//    private double area;
//    private double prerimetro;

    public void setLadoA(double ladoA) {
        this.ladoA = ladoA;
    }

//    public Retangulo(double ladoA, double ladoB, String nome) {
//        super(nome);
//        this.ladoA = ladoA;
//        this.ladoB = ladoB;
//
//    }
    public void setLadoB(double ladoB) {
        this.ladoB = ladoB;
    }

    public double getLadoA() {
        return ladoA;
    }

    public double getLadoB() {
        return ladoB;
    }

//    public double getArea() {
//        this.area = (this.ladoA * this.ladoB) / 2;
//        return area;
//    }
//
//    public double getPrerimetro() {
//        this.prerimetro = (this.ladoA + this.ladoB) + (this.ladoA + this.ladoB);
//        return prerimetro;
//    }


    @Override
    public void area() {
        setArea((this.ladoA * this.ladoB) / 2);
    }

    @Override
    public void perimetro() {
        setPerimetro((this.ladoA + this.ladoB) + (this.ladoA + this.ladoB));
    }
}
